import classnames from "classnames";

const pageName = "lottery.item";
const klassName = pageName.replace(/\./g, '-');

export default function BoxComp({data, handler, index, opens}) {
  return (
    <div style={{animationDelay: `${Math.random()}s`}}
         className={classnames(`cp-${klassName}`, {
           open: opens.includes(index),
           "animate__f animate__animated": !opens.includes(index)
         })} onClick={e => handler.select(index)}
    >
      <div className="inner">
        <div className="box">
          <div className="box-cover" />
          <div className="box-body" />
        </div>
      </div>
    </div>
  )
}